import javax.annotation.processing.FilerException;
import java.util.Arrays;
import java.util.Scanner;

import static java.lang.Math.sqrt;
class Date {
    private int x;
    private int y;
    private int sum;
    public Date(int x, int y) {
        this.x = x;
        this.y = y;
        sum=this.x+this.y;
    }

    public int getSum() {
        return sum;
    }
}

class Person {
    private int age;

    public Person(int age) {
        if (age>=200) {
            this.age=200;
            return;
        }
        if (age<=0) {
            this.age=0;
            return;
        }
        this.age = age;
    }

    public int getAge() {
        return age;
    }
}
class Base1 {

    int x;
    int y;
    public Base1(int x, int y) {
        this.x = x;
        this.y = y;
    }
  public int calculate() {
       return x*y;
  }
}
class Sub extends Base1 {
   private int z;

   public Sub(int x, int y,int z) {
        super(x, y);
        this.z=z;
    }

    public Sub(int x,int y) {
        super(x,y);
    }

    public int Add() {
       return x*y*z;
    }
    public int calculate() {
       return x/y;
    }
}
class UserNameException extends Exception{

    public UserNameException(String p) {
        super(p);
    }
}

public class Test {


    public static void main(String[] args) {
        //计算日期
        Scanner scanner=new Scanner(System.in);
         String date =scanner.next();
         String[]date1=date.split(" ");
         if (date1.length<6) {
             System.out.println("您输入的数据不合理");
         } else {


         }
    }
    public static void func(int x) throws UserNameException{
        if (x<0||x>100) {
            throw new UserNameException("分数不合法");
        }
        else {
            System.out.println(x);
        }
    }
    public static void main15(String[] args)throws UserNameException {
        Scanner scanner=new Scanner(System.in);
    try {
        func(scanner.nextInt());
    }catch (UserNameException a) {
        System.out.println(a.getMessage());
    }
    finally {
        scanner.close();
    }
}

    public static void main14(String[] args) {
        //在父类Base中定义了计算方法calculate()，该方法用于计算两个数的乘积（X*Y）。
        // 请在子类Sub中重写该方法，将计算逻辑由乘法改为除法（X/Y）
        Scanner scan = new Scanner(System.in);
        int x=scan.nextInt();
        int y=scan.nextInt();
        if (y==0) {
            System.out.println("Error");
            return;
        }
        Sub sub=new Sub(x,y);
        System.out.println(sub.calculate());

    }
    public static void main13(String[] args) {
        //有父类Base，内部定义了x、y属性。有子类Sub，继承自父类Base。子类新增了一个z属性
        Scanner scan = new Scanner(System.in);
        Sub sub=new Sub(scan.nextInt(),scan.nextInt(),scan.nextInt());
        System.out.println(sub.Add());
    }
    public static void main12(String[] args) {
        //采用封装的思想，为Person类定义年龄属性，要求：
        //修改年龄时判断其范围，若年龄小于0则按0输出，若年龄大于200则按200输出。
        Scanner scan = new Scanner(System.in);
        Person person=new Person(scan.nextInt());
        System.out.println(person.getAge());
    }
    public static void main11(String[] args) {
        //书写一个求和的Date类
        Scanner scan = new Scanner(System.in);
        int x=scan.nextInt();
        int y=scan.nextInt();
        Date date=new Date(x,y);
        System.out.println(date.getSum());
    }

    public static void main10(String[] args) {
        //给定一个二维数组，请你编写一个求和函数，计算出这个数组元素的和
        int[][]array=new int[3][3];
        int sum=0;
        for (int i = 0; i <array.length ; i++) {
            for (int j = 0; j <array[i].length ; j++) {
                array[i][j]=i*j;
            sum+=array[i][j];
            }
        }
        System.out.println(sum);
    }
    public static void main9(String[] args) {
        Scanner scan = new Scanner(System.in);
        int[]array=new int[6];
        for (int i = 0; i <6 ; i++) {
            array[i] = scan.nextInt();
        }
        System.out.println(Arrays.toString(array));
        int []array1=new int[6];
        for (int i = 0; i < 6; i++) {
            array1[i]=array[5-i];
        }
        System.out.println(Arrays.toString(array1));
    }
    public static void main8(String[] args) {
        Scanner scan = new Scanner(System.in);
        int[]array=new int[6];
        for (int i = 0; i <6 ; i++) {
            array[i] = scan.nextInt();
        }
        System.out.print("[");
        for (int i = 0; i <array.length ; i++) {
            if(i+1!=array.length)
                System.out.print(array[i]+", ");
            else {
                System.out.print(array[i]);
            }
        }
        System.out.print("]");
        System.out.println();
        System.out.print("[");
        for (int i = array.length-1; i >=0 ; i--) {
            if(i!=0)
                System.out.print(array[i]+", ");
            else {
                System.out.print(array[i]);

            }
        }
        System.out.print("]");
    }
    public static void main7(String[] args) {
       //输入6个整数，先将其输出然后再将数组倒转，再次输出数组
        Scanner scan = new Scanner(System.in);
        int[]array=new int[6];
        for (int i = 0; i <6 ; i++) {
            array[i] = scan.nextInt();
        }
        //转化为字符串
        String p1=Arrays.toString(array);
        System.out.println(p1);
        //去掉头，尾的中括号
        String p3=p1.substring(1, p1.length()-1);
         StringBuilder p=new StringBuilder(p3);
        System.out.println("["+p.reverse()+"]");
    }
    public static void main6(String[] args) {
        //将用户输入的六个数字填入数组并找出数组中最大值和最小值
        Scanner scan = new Scanner(System.in);
        int[]array=new int[6];
        array[0]=scan.nextInt();

        int max=array[0];
        int min=array[0];
        for (int i = 1; i <6 ; i++) {
            array[i]=scan.nextInt();
            if (max<array[i]) {
                max=array[i];
            }
            if (min>array[i]) {
                min=array[i];
            }
        }
        System.out.println(max+" "+min);
    }
    public static void main5(String[] args) {
        //输入一个整数，计算它的位数。如果输入的整数不大于0则输出这个数
        Scanner scan = new Scanner(System.in);
        int n=scan.nextInt();
        if (n<0) {
            System.out.println(n);
        } else {
            int count=0;
            while (n!=0) {
                count++;
                n/=10;
            }
            System.out.println(count);
        }
    }
    public static void main4(String[] args) {
        //判断质数
        Scanner scan = new Scanner(System.in);
        int n=scan.nextInt();
        for (int i = 2; i <= sqrt(n); i++) {
            if (n%i==0) {
                System.out.println(false);
                return;
            }
        }
        System.out.println(true);
    }
    public static void main3(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n=0,i=0;
        double s=0;
        while((n=scan.nextInt())>=0){
            s=s+n;
            i++;
        }
        System.out.println(String.format("%.2f",s/i));
    }

    public static void main2(String[] args) {
        //键盘输入任意多个10000以内正整数（负数代表结束），求出它们的平均数
        double sum=0;
        int count=0;
        Scanner in = new Scanner(System.in);
        int i=0;
        for ( i = 0;  ; i++) {
            int p=in.nextInt();
            if (p<0) {
                break;
            }
            sum+=p;
        }
        System.out.printf("%.2f",sum/i);
    }

    public static void main1(String[] args) {
        //一球从h米高度自由落下，每次落地后反弹回原高度的一半再落下，
        // 求它在第n次落地时共经过了多少米？第n次反弹多高？
        Scanner scanner=new Scanner(System.in);
        //输入小球的初始高度和落地的次数（先输入小球初始高度再输入反弹次数）
        int height=scanner.nextInt();
        int count=scanner.nextInt();
        double uheight=height;//记录第N次反弹多高
        double distance=height;//路程
        while (count!=0) {
            count--;
            uheight=0.5*uheight;//每次为之前的一半
            if (count-1!=0)
            distance=distance+uheight*2;//每次记录经过的路程
            else
                distance=distance+uheight;//每次记录经过的路程

        }
        System.out.printf("%.3f %.3f",uheight,distance);
    }
}
